package com.dzq.controls
{
import mx.controls.Image;
import mx.controls.Label;
import mx.core.UIComponent;
import mx.events.SliderEvent;
	
	
[Event(name="change", type="mx.events.SliderEvent")]
	
public class RatingHSlider2 extends UIComponent
{

	[Embed(source='../assets/RatingBox.gif')]
    private var box:Class;
    
    private var lbl:Label;
    public var value:int;
    [Inspectable(defaultValue="true")]
    
	public function RatingHSlider2()
	{
		var img:Image = new Image();
		img.source = box;
		img.y = 10;
		img.width = 220;
		img.height = 33;
		addChild(img);
		
		var rhs:RatingHSlider = new RatingHSlider();
		rhs.y = 20;
		rhs.x = 2;
		rhs.addEventListener(SliderEvent.CHANGE, function():void{
			value = rhs.value;
			dispatchEvent(new SliderEvent(SliderEvent.CHANGE));
		});
		addChild(rhs);			
				
	}

}
}